JavaScript

A5.ListBoxindexFromPoint Method

Syntax

A5.ListBox.indexFromPoint(x,y)

Arguments

xnumber

The X coordinate in pixels of a point.

ynumber

The Y coordinate in pixels of a point.

Returns

indexnumber

The list row index of the given point. A value of -1 will be returned if the coordinates are not over list row.

Description

Get the index of the list row matching the passed in coordinates.

Example

// To get a pointer to the A5.ListBox class see {dialog.object}.getControl
// assume lObj is a pointer to an instance of the A5.ListBox class
var indx = lObj.indexFromPoint(100,20); // "indx" will equal a number representing the "renderIndex" of the element at the X/Y coordinates of 100/20

See Also